import junit.framework.TestCase;
import rental.*;


public class TestForKidsClassification extends TestCase {
	
	ForKidsClassification kidsMovie;
	
	protected void setUp() throws Exception {
		kidsMovie = new ForKidsClassification();
	}
	
	public void testGetPriceCode() {
		assertEquals(2, kidsMovie.getPriceCode());
		ForKidsClassification kids2 = new ForKidsClassification();
		assertEquals(2, kids2.getPriceCode());
	}
	
	public void testGetRentValue1(){
		assertEquals(1.5, kidsMovie.getRentValue(1));
		assertEquals(1.5, kidsMovie.getRentValue(2));
		assertEquals(1.5, kidsMovie.getRentValue(3));
	}
	
	public void testGetRentValue2(){
		assertEquals(3.0, kidsMovie.getRentValue(4));
		assertEquals(4.5, kidsMovie.getRentValue(5));
		assertEquals(12.0, kidsMovie.getRentValue(10));
		assertEquals(147.0, kidsMovie.getRentValue(100));
		assertEquals(1497.0, kidsMovie.getRentValue(1000));
	}

	public void testGetMsg() {
		assertEquals("Movie recommended for all ages.", kidsMovie.getMsg());
	}

	public void testGetProgramPoints(){
		assertEquals(1, kidsMovie.getProgramPoints(0));
		ForKidsClassification kids2 = new ForKidsClassification();
		assertEquals(1, kids2.getProgramPoints(1));
		assertEquals(1, kids2.getProgramPoints(5));
		assertEquals(1, kids2.getProgramPoints(10));
		assertEquals(1, kids2.getProgramPoints(100));
		assertEquals(1, kids2.getProgramPoints(1000));
	}
}
